package com.softeem.hello.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
public class HelloController {

    @RequestMapping("/hello")
    public String sayHello(){
        return "hello springboot!";
    }
    @RequestMapping("/details")
    public Map<String,Object> details(){
        Map<String,Object> map = new HashMap<>();
        map.put("code",200);
        map.put("msg", "请求成功");
        map.put("success",true);
        map.put("data","这是附加数据");
        return map;
    }
}
